// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  compatibilityDate: "2025-07-15",
  devtools: { enabled: false },
  css: [
    "ant-design-vue/dist/reset.css", // 引入 Ant Design 的样式文件
  ],
  build: {
    transpile: ["ant-design-vue"], // 确保 Ant Design Vue 的组件被正确编译
  },
  vite: {
    css: {
      preprocessorMaxWorkers: true, // CPU 数量减 1
      preprocessorOptions: {
        scss: {
          additionalData: '@use "~/assets/_colors.scss" as *;',
        },
      },
    },
  },
  modules: [
    [
      "@pinia/nuxt",
      {
        autoImports: [
          // 自动引入 `defineStore()`
          "defineStore",
          // 自动引入 `defineStore()` 并重命名为 `definePiniaStore()`
          ["defineStore", "definePiniaStore"],
        ],
      },
    ],
  ],
});
